package com.forum.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 
 * @TableName block_rela
 */
@TableName(value ="block_rela")
public class BlockRela implements Serializable {
    /**
     * 用户id
     */
    private Long userid1;

    /**
     * 拉黑者id
     */
    private Long userid2;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    public Long getUserid1() {
        return userid1;
    }

    /**
     * 用户id
     */
    public void setUserid1(Long userid1) {
        this.userid1 = userid1;
    }

    /**
     * 拉黑者id
     */
    public Long getUserid2() {
        return userid2;
    }

    /**
     * 拉黑者id
     */
    public void setUserid2(Long userid2) {
        this.userid2 = userid2;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BlockRela other = (BlockRela) that;
        return (this.getUserid1() == null ? other.getUserid1() == null : this.getUserid1().equals(other.getUserid1()))
            && (this.getUserid2() == null ? other.getUserid2() == null : this.getUserid2().equals(other.getUserid2()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserid1() == null) ? 0 : getUserid1().hashCode());
        result = prime * result + ((getUserid2() == null) ? 0 : getUserid2().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userid1=").append(userid1);
        sb.append(", userid2=").append(userid2);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}